import axios from '@/request.js'
import { queryParams } from "@/composables/util"

export function getmember(page,query){
  let r = queryParams(query)
    return axios.get(`/member?page=${page}${r}`);
  } 

export function create(data) {
    return axios.post("/member/create", data);
  }

export function update(id,data) {
  return axios.post(`/member/update?id=${id}`, data);
}

export function del(id){
  return axios.post(`/member/delete/id/${id}`);
}

//消费分析
export function member(keyword='',time=[]) {
  return axios.get(`/sale/getmember?keyword=${keyword}&time=${time}`);
}